package com.example.designpatterns.behavioral.iterator;

/**
 * 具体集合
 *
 * @author scott
 */
public class ConcreteCollection implements Collection {

    private Object[] elements;

    public ConcreteCollection(Object[] elements) {
        this.elements = elements;
    }

    @Override
    public Iterator createIterator() {
        return new ConcreteIterator(elements);
    }

}
